package com.eduplatform.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class SchoolDTO {

    private Long id;

    @NotBlank(message = "学校名称不能为空")
    @Size(max = 100, message = "学校名称长度不能超过100个字符")
    private String name;

    @NotBlank(message = "学校代码不能为空")
    @Size(max = 50, message = "学校代码长度不能超过50个字符")
    private String code;

    @Size(max = 200, message = "地址长度不能超过200个字符")
    private String address;

    private String logo;

    @Size(max = 500, message = "描述长度不能超过500个字符")
    private String description;

    @NotBlank(message = "联系人不能为空")
    @Size(max = 50, message = "联系人长度不能超过50个字符")
    private String contactPerson;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String contactPhone;

    @Email(message = "邮箱格式不正确")
    private String contactEmail;

    private Integer status;
}